home *** CD-ROM | disk | FTP | other *** search
- function helibeenhit()
- {
- var _loc1_ = 0;
- while(_loc1_ < wall_ar.length)
- {
- if(heli._x + 54 > wall_ar[_loc1_]._x - wall_ar[_loc1_]._width / 2 && heli._x - 54 < wall_ar[_loc1_]._x + wall_ar[_loc1_]._width / 2 && heli._y + 18 > wall_ar[_loc1_]._y - wall_ar[_loc1_]._height / 2 && heli._y - 18 < wall_ar[_loc1_]._y + wall_ar[_loc1_]._height / 2)
- {
- cols = "down";
- lose();
- }
- _loc1_ = _loc1_ + 1;
- }
- _loc1_ = 0;
- while(_loc1_ < wall_ar_up.length)
- {
- if(heli._x + 54 > wall_ar_up[_loc1_]._x - wall_ar_up[_loc1_]._width / 2 && heli._x - 54 < wall_ar_up[_loc1_]._x + wall_ar_up[_loc1_]._width / 2 && heli._y + 18 > wall_ar_up[_loc1_]._y - wall_ar_up[_loc1_]._height / 2 && heli._y - 18 < wall_ar_up[_loc1_]._y + wall_ar_up[_loc1_]._height / 2)
- {
- cols = "up";
- lose();
- }
- _loc1_ = _loc1_ + 1;
- }
- _loc1_ = 0;
- while(_loc1_ < obs_ar.length)
- {
- if(heli._x + 54 > obs_ar[_loc1_]._x - obs_ar[_loc1_]._width / 2 && heli._x - 54 < obs_ar[_loc1_]._x + obs_ar[_loc1_]._width / 2 && heli._y + 18 > obs_ar[_loc1_]._y - obs_ar[_loc1_]._height / 2 && heli._y - 18 < obs_ar[_loc1_]._y + obs_ar[_loc1_]._height / 2 && obs_ar[_loc1_]._currentframe == 1)
- {
- cols = "obs";
- lose();
- }
- var _loc2_ = 0;
- while(_loc2_ < pac_shoot.length)
- {
- if(pac_shoot[_loc2_]._x + 10 > obs_ar[_loc1_]._x - obs_ar[_loc1_]._width / 2 && pac_shoot[_loc2_]._x - 10 < obs_ar[_loc1_]._x + obs_ar[_loc1_]._width / 2 && pac_shoot[_loc2_]._y + 6 > obs_ar[_loc1_]._y - obs_ar[_loc1_]._height / 2 && pac_shoot[_loc2_]._y - 6 < obs_ar[_loc1_]._y + obs_ar[_loc1_]._height / 2 && obs_ar[_loc1_]._currentframe == 1)
- {
- expl_fun(pac_shoot[_loc2_]);
- obs_ar[_loc1_].gotoAndPlay(2);
- scoreplus("point_p_50",pac_shoot[_loc2_]);
- score_num += 50;
- removeMovieClip(pac_shoot[_loc2_]);
- }
- _loc2_ = _loc2_ + 1;
- }
- _loc1_ = _loc1_ + 1;
- }
- }
- function lose()
- {
- savercore();
- trace("you lose");
- clearInterval(inter_wall);
- clearInterval(inter_obs);
- clearInterval(inter_score);
- clearInterval(heli_inter);
- clearInterval(inter_hostage);
- heli_speed = 0;
- live = 1;
- player = 0;
- if(cols == "obs")
- {
- heli_bb._x = heli._x;
- heli_bb._y = heli._y;
- expl_fun(heli);
- heli_bb.gotoAndPlay(2);
- }
- if(cols == "up" || cols == "down")
- {
- mas_up_boom._x = heli._x;
- mas_up_boom._y = heli._y;
- expl_fun(heli);
- copup_inter = setInterval(col_up,15);
- sound_a1 = 2;
- }
- heli._x = 1000;
- heli._y = 1000;
- res_but._x = 520;
- res_but._y = 100;
- men_but._x = 520;
- men_but._y = 240;
- butxx._x = 520;
- butxx._y = 170;
- you._x = 160;
- you._y = 100;
- name1._x = 220;
- name1._y = 88;
- joy._x = 500;
- joy._y = 444;
- var _loc1_ = 0;
- while(_loc1_ < obs_ar.length)
- {
- removeMovieClip(obs_ar[_loc1_]);
- _loc1_ = _loc1_ + 1;
- }
- }
- function checkhitHos()
- {
- var _loc1_ = 0;
- while(_loc1_ < hos_ar.length)
- {
- if(hos_ar[_loc1_]._x + 5 > heli._x - 50 && hos_ar[_loc1_]._x - 5 < heli._x + 50 && hos_ar[_loc1_]._y + 8 > heli._y - 18 && hos_ar[_loc1_]._y - 8 < heli._y + 18 && hos_ar[_loc1_]._currentframe <= 20)
- {
- if(hos_ar[_loc1_].the_scr == 0)
- {
- scoreplus("point_p_20",hos_ar[_loc1_]);
- score_num += 20;
- hos_ar[_loc1_].gotoAndPlay(31);
- }
- else if(hos_ar[_loc1_].the_scr == 1)
- {
- scoreplus("point_p_30",hos_ar[_loc1_]);
- score_num += 30;
- hos_ar[_loc1_].gotoAndPlay(31);
- }
- else if(hos_ar[_loc1_].the_scr == 2)
- {
- scoreplus("point_p_50",hos_ar[_loc1_]);
- score_num += 50;
- hos_ar[_loc1_].gotoAndPlay(31);
- }
- else if(hos_ar[_loc1_].the_scr == 3)
- {
- scoreplus("point_p_100",hos_ar[_loc1_]);
- score_num += 100;
- hos_ar[_loc1_].gotoAndPlay(31);
- }
- else if(hos_ar[_loc1_].the_scr == 4)
- {
- scoreplus("point_p_ammo",hos_ar[_loc1_]);
- ammo += 2;
- hos_ar[_loc1_].gotoAndPlay(31);
- }
- removeMovieClip(hos_ar[_loc1_]);
- }
- if(hos_ar[_loc1_]._x + 5 > heli._x - 50 && hos_ar[_loc1_]._x - 5 < heli._x + 50 && hos_ar[_loc1_]._y - 35 > heli._y - 18 && hos_ar[_loc1_]._y - 56 < heli._y + 18 && hos_ar[_loc1_]._currentframe <= 20)
- {
- hos_ar[_loc1_].gotoAndPlay(21);
- scoreplus("point_p_10",hos_ar[_loc1_]);
- score_num -= 200;
- }
- _loc1_ = _loc1_ + 1;
- }
- }
- function col_up()
- {
- mas_up_boom._x += speed_fall;
- mas_up_boom._y += speed_fall_y;
- mas_up_boom._rotation += rotation_heli;
- var _loc1_ = 0;
- while(_loc1_ < wall_ar.length)
- {
- if(mas_up_boom._x + 54 > wall_ar[_loc1_]._x - wall_ar[_loc1_]._width / 2 && mas_up_boom._x - 54 < wall_ar[_loc1_]._x + wall_ar[_loc1_]._width / 2 && mas_up_boom._y + 18 > wall_ar[_loc1_]._y - wall_ar[_loc1_]._height / 2 && mas_up_boom._y - 18 < wall_ar[_loc1_]._y + wall_ar[_loc1_]._height / 2)
- {
- if(mas_up_boom._rotation > 0)
- {
- rotation_heli = -0.8;
- }
- mas_up_boom._y -= 5;
- if(speed_fall > 0)
- {
- speed_fall -= 0.1;
- }
- if(mas_up_boom._rotation < 0 && mas_up_boom._currentframe == 1)
- {
- rotation_heli = 0;
- mas_up_boom.gotoAndPlay(2);
- expl_fun(mas_up_boom);
- }
- }
- _loc1_ = _loc1_ + 1;
- }
- }
- function savercore()
- {
- var _loc1_ = SharedObject.getLocal("hind");
- trace("iso=" + _loc1_.data.userId);
- if(score_num > _loc1_.data.userId || _loc1_.data.userId == undefined)
- {
- _loc1_.data.userId = score_num;
- trace(_loc1_.data.userId);
- _loc1_.onStatus = function(ff)
- {
- trace(ff.code);
- };
- var _loc2_ = _loc1_.flush(1000);
- }
- }
- stop();
- var cols = "";
- var copup_inter;
- var speed_fall = 1;
- var speed_fall_y = 5;
- var rotation_heli = 0.5;
-